Loops.

Published on: Mon Feb 15 2010

Iterative Programming Repeat same task over and over w/ different data Loop Elements 1. Initialization 2. Test loop condition 3. Loop Body (Task to repeat) 4. Loop Update. for ( initialization; loop condition test; loop update) { loop body; } Fancy Loop header for (i=0,j=1; i < 5; i++, j++) Loop headers can include calls to functions and omit headers. while (loop condition) { loop body loop update }